﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WeaponTrigger : MonoBehaviour
{
    private bool isWeaponTrigger;
    void Start()
    {

    }
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Finish"))
        {
           
            isWeaponTrigger = true;

        }
    }
    //private void OnTriggerStay(Collider other)
    //{
    //    if (other.CompareTag("Item"))
    //    {
    //        持续在触发器内时输出信息
    //        Debug.Log("持续触发");
    //        MobileController._intance.detectionManifests();
    //    }
    //}
    void Update()
    {
        if (isWeaponTrigger)
        {

            MobileController._instance.detectionManifests();
        }
    }
    private void OnTriggerExit(Collider other)
    {


   
        isWeaponTrigger = false;

    }
}